export default function (app) {
    app.directive("waterfall", {
        mounted(el, binding) {
            let gap = (el.getAttribute("gap") || '5').replace("px", "") + "px"
            el.style.display = "grid"
            el.style.gridTemplateColumns = `repeat(auto-fill, minmax(${binding.value || '280'}px, 1fr))`
            el.style.gap = gap
            if (binding.modifiers.padding) el.style.padding = gap
        }
    })
}